<template>
  <div class="box">
    <h5>父组件</h5>
    <OneChildBox @update-info="getInfo"></OneChildBox>
    <TwoChildBox :info="temp"></TwoChildBox>
  </div>
</template>

<script>
import OneChildBox from "./One/OneChildBox";
import TwoChildBox from "./Two/TwoChildBox";
export default {
  components: {
    OneChildBox,
    TwoChildBox,
  },
  data() {
    return {
      temp: "",
    };
  },
  methods: {
    getInfo(nv) {
      console.log("OtherParent", nv);
      this.temp = nv;
    },
  },
};
</script>
